﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;

using Microsoft.Practices.Unity;
using Microsoft.Practices.Unity.Configuration; 
using System.Configuration;
using System.Web.Routing; 
namespace Skynet.LiteForm
{
    public class Global : System.Web.HttpApplication
    { 
        private void RegisterRoutes(RouteCollection Routes ) 
        {

            Routes.MapPageRoute("MaintenanceCategories", "MaintenanceExamCategory", "~/Administration/MaintenanceExamCategory.aspx");

        }
        protected void Application_Start(object sender, EventArgs e)
        {
            RegisterRoutes( RouteTable.Routes); 


            //var container = HttpContext.Current.Application.GetContainer();
            //var AspectPath = Server.MapPath("~/Config/Aspect.config");
            //var AspectMap = new ExeConfigurationFileMap() { ExeConfigFilename = AspectPath };
            //var AspectSection = System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(AspectMap, ConfigurationUserLevel.None).GetSection("unity") as UnityConfigurationSection;
            //container.LoadConfiguration(AspectSection);

            //var DataAccessPath = Server.MapPath("~/Config/DataAccess.config");
            //var DataAccessMap = new ExeConfigurationFileMap() { ExeConfigFilename = DataAccessPath };
            //var DataAccessSection = System.Configuration.ConfigurationManager.OpenMappedExeConfiguration(DataAccessMap, ConfigurationUserLevel.None).GetSection("unity") as UnityConfigurationSection;
            //container.LoadConfiguration(DataAccessSection);
        }

        protected void Session_Start(object sender, EventArgs e)
        {

        }

        protected void Application_BeginRequest(object sender, EventArgs e)
        {

        }

        protected void Application_AuthenticateRequest(object sender, EventArgs e)
        {

        }

        protected void Application_Error(object sender, EventArgs e)
        {
            

        }

        protected void Session_End(object sender, EventArgs e)
        {

        }

        protected void Application_End(object sender, EventArgs e)
        {

        }
    }
}